<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

</head>
<body>
    <div id="app">
        <div>{{time}}</div>
    </div>
    <script>
        new Vue({
            el:'#app',
            data:{
                time:new Date().toLocaleString()
            },
            created(){
                /* axios({
                    url:'',
                    methods:'',
                    data:{},
                    params:{}
                }).then((res)=>{this.stus = res.data;})
                this.time = 1; */
                // alert(1);
                // 定时器 间歇调用
                setInterval(()=>{
                    this.time = new Date().toLocaleString();
                    // 每隔1000ms调用一次函数
                },1000)
            },
            methods:{
                
            },
        })
    </script>

</body>
</html>